package com.wn55.hrms.mapper;

import com.github.pagehelper.PageInfo;
import com.wn55.hrms.entity.Attendance;
import com.wn55.hrms.service.vo.AttendanceVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
 * @author 86132
 * attendance接口
 */
@Repository
public interface AttendanceMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Attendance record);

    Attendance selectByPrimaryKey(Integer id);

    List<Attendance> selectAll();

    int updateByPrimaryKey(Attendance record);

    List<AttendanceVo> selectByEmpName(String empName);

    @Insert(value = "insert into attendance (e_id,recording_time) values (#{eId},#{recordingTime})")
    @Options(useGeneratedKeys = true,keyProperty ="id",keyColumn = "id")
    void insertAttendance(Attendance attendance);

    int selectAllDay(@Param("salaryMonth") String salaryMonth,@Param("id") Long id);
}